package com.spzx.test1.t1;
/*
    并非全力
*/

public class Test3 {
    public static void main(String[] args) {
        Thread.currentThread().setName("刘备");
        System.out.println(Thread.currentThread().getName() + "出世");


        Thread lvmeng = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + "白衣渡川");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(Thread.currentThread().getName() + "斩汉寿亭侯关云长也");
        }, "吕子蒙");

        Thread luxung = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + "火烧连营");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(Thread.currentThread().getName() + "背负火影之名...");
        }, "陆伯言");

        lvmeng.setDaemon(true);
        luxung.setDaemon(true);

        lvmeng.start();
        luxung.start();

        System.out.println(Thread.currentThread().getName() + "三分天下GG");

    }


}
